package com.yang.inventorymanagement.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName suppliers
 */
@TableName(value ="suppliers")
@Data
public class Suppliers implements Serializable {
    /**
     * 供应商ID
     */
    @TableId(type = IdType.AUTO)
    private Integer supplierid;

    /**
     *  供应商名称
     */
    private String suppliername;

    /**
     * 联系人姓名
     */
    private String contactname;

    /**
     *  联系人邮箱
     */
    private String contactemail;

    /**
     *  联系人邮箱
     */
    private Date createdat;

    /**
     * 创建人
     */
    private Integer createdby;

    /**
     * 修改时间
     */
    private Date updatedat;

    /**
     * 修改人
     */
    private Integer updatedby;

    /**
     * 逻辑删除字段
     */
    private Integer isdeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Suppliers other = (Suppliers) that;
        return (this.getSupplierid() == null ? other.getSupplierid() == null : this.getSupplierid().equals(other.getSupplierid()))
            && (this.getSuppliername() == null ? other.getSuppliername() == null : this.getSuppliername().equals(other.getSuppliername()))
            && (this.getContactname() == null ? other.getContactname() == null : this.getContactname().equals(other.getContactname()))
            && (this.getContactemail() == null ? other.getContactemail() == null : this.getContactemail().equals(other.getContactemail()))
            && (this.getCreatedat() == null ? other.getCreatedat() == null : this.getCreatedat().equals(other.getCreatedat()))
            && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))
            && (this.getUpdatedat() == null ? other.getUpdatedat() == null : this.getUpdatedat().equals(other.getUpdatedat()))
            && (this.getUpdatedby() == null ? other.getUpdatedby() == null : this.getUpdatedby().equals(other.getUpdatedby()))
            && (this.getIsdeleted() == null ? other.getIsdeleted() == null : this.getIsdeleted().equals(other.getIsdeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSupplierid() == null) ? 0 : getSupplierid().hashCode());
        result = prime * result + ((getSuppliername() == null) ? 0 : getSuppliername().hashCode());
        result = prime * result + ((getContactname() == null) ? 0 : getContactname().hashCode());
        result = prime * result + ((getContactemail() == null) ? 0 : getContactemail().hashCode());
        result = prime * result + ((getCreatedat() == null) ? 0 : getCreatedat().hashCode());
        result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode());
        result = prime * result + ((getUpdatedat() == null) ? 0 : getUpdatedat().hashCode());
        result = prime * result + ((getUpdatedby() == null) ? 0 : getUpdatedby().hashCode());
        result = prime * result + ((getIsdeleted() == null) ? 0 : getIsdeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", supplierid=").append(supplierid);
        sb.append(", suppliername=").append(suppliername);
        sb.append(", contactname=").append(contactname);
        sb.append(", contactemail=").append(contactemail);
        sb.append(", createdat=").append(createdat);
        sb.append(", createdby=").append(createdby);
        sb.append(", updatedat=").append(updatedat);
        sb.append(", updatedby=").append(updatedby);
        sb.append(", isdeleted=").append(isdeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}